#include <string>

#include "redis_executor/redis_executor.h"
#include "redis_executor/scoped_reply.h"

#include "SessionService_types.h"

namespace imserver {

class RedisSessionAdapter {
 public:
  RedisSessionAdapter(RedisLocator * locator);
  int AddSession(const int64_t id, const std::string& session);
  int RemoveSession(const int64_t id, const std::string& session);
  bool VerifySession(const int64_t id, const std::string& session);
  int GetSessionList(SessionList * session_list, const int64_t uid);

  int GetOnlineUsers(const std::vector<int64_t> & ids, 
      std::map<int64_t, SessionType::type> * _return);


  int LinkTempIdQid(const int64_t temp_id, const int64_t qid);
  int64_t GetQidByTempId(const int64_t temp_id);

 private:
  RedisExecutor redis_exec_;
};

}

